.class public final Lcom/tendcloud/tenddata/zz;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/tendcloud/tenddata/ao;


# static fields
.field private static volatile e:Lcom/tendcloud/tenddata/zz;


# instance fields
.field private final a:Ljava/lang/String;

.field private final b:Ljava/lang/String;

.field private final c:Ljava/lang/String;

.field private final d:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/tendcloud/tenddata/zz;->e:Lcom/tendcloud/tenddata/zz;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-string v0, "u.talkingdata.net"

    iput-object v0, p0, Lcom/tendcloud/tenddata/zz;->a:Ljava/lang/String;

    const-string v0, "https"

    iput-object v0, p0, Lcom/tendcloud/tenddata/zz;->b:Ljava/lang/String;

    const-string v0, "https://u.talkingdata.net/ota/a/TD/android/ver"

    iput-object v0, p0, Lcom/tendcloud/tenddata/zz;->c:Ljava/lang/String;

    const-string v0, "https://u.talkingdata.net/ota/a/TD/android/sdk.zip"

    iput-object v0, p0, Lcom/tendcloud/tenddata/zz;->d:Ljava/lang/String;

    sput-object p0, Lcom/tendcloud/tenddata/zz;->e:Lcom/tendcloud/tenddata/zz;

    return-void
.end method

.method static declared-synchronized f()Lcom/tendcloud/tenddata/zz;
    .locals 3

    const-class v1, Lcom/tendcloud/tenddata/zz;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/tendcloud/tenddata/zz;->e:Lcom/tendcloud/tenddata/zz;

    if-nez v0, :cond_1

    const-class v2, Lcom/tendcloud/tenddata/zz;

    monitor-enter v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    :try_start_1
    sget-object v0, Lcom/tendcloud/tenddata/zz;->e:Lcom/tendcloud/tenddata/zz;

    if-nez v0, :cond_0

    new-instance v0, Lcom/tendcloud/tenddata/zz;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/zz;-><init>()V

    sput-object v0, Lcom/tendcloud/tenddata/zz;->e:Lcom/tendcloud/tenddata/zz;

    :cond_0
    monitor-exit v2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :cond_1
    :try_start_2
    sget-object v0, Lcom/tendcloud/tenddata/zz;->e:Lcom/tendcloud/tenddata/zz;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    monitor-exit v1

    return-object v0

    :catchall_0
    move-exception v0

    :try_start_3
    monitor-exit v2
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    :try_start_4
    throw v0
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_1

    :catchall_1
    move-exception v0

    monitor-exit v1

    throw v0
.end method


# virtual methods
.method public a()Ljava/lang/String;
    .locals 1

    const-string v0, "+V2.2.48 gp"

    return-object v0
.end method

.method public a(Landroid/app/Activity;)V
    .locals 1

    :try_start_0
    invoke-static {p1}, Lcom/tendcloud/tenddata/gd;->a(Landroid/app/Activity;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public a(Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    const/4 v1, 0x0

    :try_start_0
    invoke-virtual {p0, p1, v0, v1}, Lcom/tendcloud/tenddata/zz;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2, p3}, Lcom/tendcloud/tenddata/gd;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    invoke-static {}, Lcom/tendcloud/tenddata/ft;->a()Lcom/tendcloud/tenddata/ft;

    invoke-static {}, Lcom/tendcloud/tenddata/fo;->a()Lcom/tendcloud/tenddata/fo;

    new-instance v0, Lcom/tendcloud/tenddata/en;

    invoke-direct {v0, p0}, Lcom/tendcloud/tenddata/en;-><init>(Lcom/tendcloud/tenddata/zz;)V

    invoke-static {v0}, Lcom/tendcloud/tenddata/ca;->execute(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2, p3, p4}, Lcom/tendcloud/tenddata/gd;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public a(Landroid/content/Context;Ljava/lang/Throwable;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2}, Lcom/tendcloud/tenddata/gd;->a(Landroid/content/Context;Ljava/lang/Throwable;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public a(Ljava/lang/String;)V
    .locals 6

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TDpref_longtime"

    const-string v2, "TDpref.last.sdk.check"

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-static {v0, v1, v2, v4, v5}, Lcom/tendcloud/tenddata/bu;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;J)V

    return-void
.end method

.method public b(Landroid/content/Context;)Ljava/lang/String;
    .locals 1

    :try_start_0
    invoke-static {p1}, Lcom/tendcloud/tenddata/gd;->a(Landroid/content/Context;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :goto_0
    return-object v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    const/4 v0, 0x0

    goto :goto_0
.end method

.method public b(Landroid/app/Activity;)V
    .locals 1

    :try_start_0
    invoke-static {p1}, Lcom/tendcloud/tenddata/gd;->b(Landroid/app/Activity;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public b()Z
    .locals 6

    sget-object v0, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    const-string v1, "TDpref_longtime"

    const-string v2, "TDpref.last.sdk.check"

    invoke-static {}, Lcom/tendcloud/tenddata/bj;->a()Lcom/tendcloud/tenddata/bj;

    move-result-object v3

    sget-object v4, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v4}, Lcom/tendcloud/tenddata/bj;->e(Landroid/content/Context;)J

    move-result-wide v4

    invoke-static {v0, v1, v2, v4, v5}, Lcom/tendcloud/tenddata/bu;->b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;J)J

    move-result-wide v0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    sub-long v0, v2, v0

    const-wide/32 v2, 0x5265c00

    div-long/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Math;->abs(J)J

    move-result-wide v0

    const-wide/16 v2, 0x7

    cmp-long v2, v0, v2

    if-gtz v2, :cond_0

    new-instance v2, Ljava/util/Random;

    invoke-direct {v2}, Ljava/util/Random;-><init>()V

    invoke-virtual {v2}, Ljava/util/Random;->nextFloat()F

    move-result v2

    long-to-float v0, v0

    mul-float/2addr v0, v2

    const/high16 v1, 0x40000000    # 2.0f

    cmpl-float v0, v0, v1

    if-lez v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public c()Ljava/lang/String;
    .locals 1

    const-string v0, "https://u.talkingdata.net/ota/a/TD/android/ver"

    return-object v0
.end method

.method public c(Z)V
    .locals 2

    :try_start_0
    sput-boolean p1, Lcom/tendcloud/tenddata/ab;->b:Z

    sget-boolean v0, Lcom/tendcloud/tenddata/TCAgent;->LOG_ON:Z

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "[PreSettings] setReportUncaughtExceptions: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/tendcloud/tenddata/ev;->a(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public d()Ljava/lang/String;
    .locals 1

    const-string v0, "https://u.talkingdata.net/ota/a/TD/android/sdk.zip"

    return-object v0
.end method

.method public e()V
    .locals 0

    return-void
.end method

.method public initialize(Landroid/content/Context;Ljava/lang/String;)V
    .locals 0

    if-eqz p1, :cond_0

    sput-object p1, Lcom/tendcloud/tenddata/ab;->mContext:Landroid/content/Context;

    :cond_0
    return-void
.end method

.method public onPageEnd(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2}, Lcom/tendcloud/tenddata/gd;->b(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public onPageStart(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2}, Lcom/tendcloud/tenddata/gd;->a(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public onResume(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2, p3}, Lcom/tendcloud/tenddata/gd;->a(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method

.method public setLocation(DDLjava/lang/String;)V
    .locals 1

    :try_start_0
    invoke-static {p1, p2, p3, p4, p5}, Lcom/tendcloud/tenddata/gd;->a(DDLjava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method
